/*
 * @作者: kerwin
 * @公众号: 大前端私房菜
 */
import React, { useEffect, useState } from 'react'
import MRouter from './router/IndexRouter'
import Tabbar from './components/Tabbar'
import store from './redux/store'
export default function App () {
    const [isShow, setIsshow] = useState(store.getState().TabbarReducer.show)
    useEffect(() => {
        // 订阅
        store.subscribe(() => {
            console.log("app订阅", store.getState())
            setIsshow(store.getState().TabbarReducer.show)
        })
    }, [])

    return (
        <div>
            {/* 其他的内容 */}
            <MRouter>
                {isShow && <Tabbar></Tabbar>}
            </MRouter>
        </div>
    )
}

/*
 /films ===>Films
 /cinemas ===>Cinemas
 /center ===> Center
*/